//
//  SelectedTopicViewController.m
//  DefendHealth
//
//  Created by 吾诺翰卓003 on 17/2/20.
//  Copyright © 2017年 iMacOne. All rights reserved.
//

#import "SelectedTopicViewController.h"
#import "SelectedTopicTableViewCell.h"
#import "SelectedTopicInsidePagesViewController.h"
@interface SelectedTopicViewController ()

@end

@implementation SelectedTopicViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.TitleNav.text = @"精选话题";
    self.baseTableView.frame = CGRectMake(0, 64, WindowWidth, WindowHeight-64);
    UIButton *releaseBtn = [[UIButton alloc] initWithFrame:CGRectMake(WindowWidth-10-[ToolUtil autoWidth:@"我参与的" width:500 height:13 num:13], 20, [ToolUtil autoWidth:@"我参与的" width:500 height:13 num:13], 44)];
    [releaseBtn setTitle:@"我参与的" forState:UIControlStateNormal];
//    [releaseBtn addTarget:self action:@selector(release:) forControlEvents:UIControlEventTouchUpInside];
    releaseBtn.titleLabel.font = FONT(13);
    releaseBtn.titleLabel.textAlignment = 2;
    [releaseBtn setTitleColor:[ImageUtil colorWithRgb:0x333333] forState:0];
    [self.view addSubview:releaseBtn];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 4;
    
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 172+15;
    
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString * cellIden = @"SelectedTopicTableViewCell";
    SelectedTopicTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellIden];
    if (cell == nil) {
        cell = [[SelectedTopicTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIden];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    cell.backgroundColor = [UIColor whiteColor];
    return cell;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    SelectedTopicInsidePagesViewController *stVC = [SelectedTopicInsidePagesViewController new];
    stVC.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:stVC animated:YES];
}
@end
